package net.sf.jOpinionPoll.tag.component;

import javax.faces.component.UIOutput;
import javax.faces.context.FacesContext;

public class UISimpleTitleComponent extends UIOutput {
	private String m_Text;
    private String m_Style;
	private String m_StyleClass;
    private String m_LineStyle;
    private String m_LineStyleClass;

	public String getText() {
		return m_Text;
	}
    
	public void setText(String text) {
		this.m_Text = text;
	}
    
	public String getStyle() {
		return m_Style;
	}

	public void setStyle(String style) {
		this.m_Style = style;
	}
	
	public String getStyleClass() {
		return m_StyleClass;
	}

	public void setStyleClass(String styleClass) {
		this.m_StyleClass = styleClass;
	}
    
    public String getLineStyle() {
        return m_LineStyle;
    }
    
    public void setLineStyle(String style) {
        m_LineStyle = style;
    }
	
    public String getLineStyleClass() {
        return m_LineStyleClass;
    }
    
    public void setLineStyleClass(String lineStyleClass) {
        m_LineStyleClass = lineStyleClass;
    }
    
	@Override
	public Object saveState(FacesContext context) {
		Object[] values = new Object[6];
		
		values[0] = super.saveState(context);
		values[1] = getText();
		values[2] = getStyleClass();
		values[3] = getStyle();
        values[4] = getLineStyleClass();
        values[5] = getLineStyle();
		
		return values;
	}
	
	@Override
	public void restoreState(FacesContext context, Object state) {
		Object[] values = (Object[])state;
		
		super.restoreState(context, values[0]);
		setText((String)values[1]);
		setStyleClass((String)values[2]);
		setStyle((String)values[3]);
		setLineStyleClass((String)values[4]);
		setLineStyle((String)values[5]);
	}
	
	@Override
	@SuppressWarnings("all")
	public String getFamily() {
		return super.COMPONENT_FAMILY;
	}
}